/**   
* @Description: TODO 
* @author caogt  
* @date 2016年7月18日 下午3:56:28 
* @version V1.0   
*/
package com.bizc.test.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.bizc.test.dao.IUserDao;
import com.bizc.test.po.User;
import com.bizc.test.service.IUserService;

@Service
public class UserService implements IUserService{

	public UserService(){
		System.out.println("------------userservice-------------"+this);
	}
	@Resource
	private IUserDao userDao;
	@Override
	public int insertUser(User user) {
		int i =  userDao.inserUser(user);
		userDao.test();
		return i;
	}
	@Override
	public int insertUser(List<User> user){
		int i = 0;
		for(User u: user){
			i+= this.insertUser(u);
		}
		
		return i;
	}
/*	@Override
	public int insertUser(List<User> user) {
		int i = 0;
		for(User u: user){
			i+= userDao.inserUser(u);
		}
		return i;
	}
*/
}
